//#pragma once
#ifndef __MIXER_H__
#define __MIXER_H__

#include "ChannelForMixer.h"
#include "Compressor.h"

class CMixer
{
public:
	CMixer(void);
	virtual ~CMixer(void);
	virtual int SetInputChannels(CChannelForMixer** pChnlPtrArray,int n);
	virtual int SetOutputChannels(CChannelForMixer** pChnlPtrArray,int n);
	virtual int SetBufferSize(int nSamples);
	virtual int GetBufferSize(void);
	virtual bool EnableCompressor(bool fEnabled);
	virtual bool ClearChannels(void);
	virtual long SetSampleRate(long nSamplePerSec);
	virtual long GetSampleRate(void);
	virtual int Process(void);
protected:
	int nInChnls;
	int nOutChnls;
	int nSmpls;
	Compressor Cmp;
	float* plibuf;
	float* pribuf;
	float* plobuf;
	float* probuf;
	CChannelForMixer** pIcs;
	CChannelForMixer** pOcs;
	bool UseCmps;
	long SPS;
};

#endif